home *** CD-ROM | disk | FTP | other *** search
/ Aminet 32 / Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso / Aminet / disk / misc / ADFlib.lha / Lib / Win32 / adf_nativ.h < prev    next >
C/C++ Source or Header  |  1999-02-08  |  1KB  |  44 lines

  1. /* Win32/adf_nativ.h
  2.  *
  3.  * Win32 specific drive access routines for ADFLib
  4.  * Copyright 1999 by Dan Sutherland <dan@chromerhino.demon.co.uk>
  5.  */
  6.  
  7. #ifndef ADF_NATIV_H
  8. #define ADF_NATIV_H
  9.  
  10. #include "../adf_str.h"
  11.  
  12. #define NATIVE_FILE  8001
  13.  
  14. #ifndef BOOL
  15. #define BOOL int
  16. #endif
  17.  
  18. #ifndef RETCODE
  19. #define RETCODE long
  20. #endif
  21.  
  22. struct nativeDevice{
  23.     FILE *fd; /* needed by adf_dump.c */
  24.     void *hDrv;
  25. };
  26.  
  27. struct nativeFunctions{
  28.     RETCODE (*adfInitDevice)(struct Device*, char*);
  29.     RETCODE (*adfNativeReadSector)(struct Device*, long, int, unsigned char*);
  30.     RETCODE (*adfNativeWriteSector)(struct Device*, long, int, unsigned char*);
  31.     BOOL (*adfIsDevNative)(char*);
  32.     RETCODE (*adfReleaseDevice)();
  33. };
  34.  
  35. void adfInitNativeFct();
  36.  
  37. RETCODE Win32ReadSector(struct Device *dev, long n, int size, unsigned char* buf);
  38. RETCODE Win32WriteSector(struct Device *dev, long n, int size, unsigned char* buf);
  39. RETCODE Win32InitDevice(struct Device *dev, char* name);
  40. RETCODE Win32ReleaseDevice(struct Device *dev);
  41. BOOL Win32IsDevNative(char*);
  42.  
  43. #endif /* ndef ADF_NATIV_H */
  44.